package com.comsoftstar.nt5s.Activity;

import android.os.Bundle;
import android.support.v7.app.AppCompatActivity;
import android.view.Gravity;
import android.view.View;
import android.widget.ImageView;
import android.widget.Toast;

import com.hzc.nt5s.R;

import org.xutils.x;

public class BigImgActivity extends AppCompatActivity {

    private BigImgActivity activity;

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_big_img);
        activity = this;
        String url = this.getIntent().getStringExtra("url");
        ImageView img = (ImageView) this.findViewById(R.id.large_image);
        x.image().bind(img, url);
        Toast toast = Toast.makeText(this, "点击图片即可返回", Toast.LENGTH_SHORT);
        toast.setGravity(Gravity.BOTTOM, 0, 0);
        toast.show();
        img.setOnClickListener(new View.OnClickListener() { // 点击返回
            public void onClick(View paramView) {
                activity.finish();
            }
        });
    }
}

